<template>
  <input
    class="form-control"
    type="text"
    :value="modelValue"
    @input="onInput"
  />
</template>

<script>
export default {
  props: {
    modelValue: String,
  },
  name: 'KInput',
  setup(props, context) {
    const onInput = (e) => {
      context.emit('update:modelValue', e.target.value);
    };
    return {
      onInput,
    };
  },
};
</script>
